﻿using System;
using System.IO;
using System.Windows.Forms;

namespace Protobuf_Gui.Domain
{
    /// <summary>
    ///  option (name) = value;
    /// </summary>
    [Serializable]
    public class ServiceMethodOption : ProtocolElement
    {
        public ServiceMethodOption(string name) : base(name)
        {
        }

        public string Value { get; set; }

        public override TreeNode ToTreeNode(TreeNode root)
        {
            throw new NotImplementedException();
        }

        public override void ToFile(TextWriter writer, uint nesting)
        {
            string line = string.Format("{0}option ({1}) = {2}", Tabs(nesting), Name, Value);
            writer.WriteLine(line);
        }
    }
}